package com.s3.khospitalds.controller;

import com.s3.khospitalds.common.R;
import com.s3.khospitalds.service.CitiesService;
import com.s3.khospitalds.service.impl.CitiesServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: xw
 * @CreateTime: 2025/3/5
 * @Description: 城市
 * @Version: 1.0
 */
@RestController
@CrossOrigin(origins = "*")
public class CitiesController {
    @Autowired
    private CitiesServiceImpl citiesService;
    @GetMapping("/getCitiesByid/{id}")
    public R getCitiesById(@PathVariable("id") int id) {
        return new R().addData("list",citiesService.getCities(id));
    }
}
